package com.fd.service.impl;


import com.fd.dao.ITestJDBC;
import com.fd.dao.impl.TestJDBC;
import com.fd.entity.Student;
import com.fd.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IStudentServiceImpl implements IStudentService {
    @Autowired
    private TestJDBC testJDBC;
//    ITestJDBC testJDBC = new TestJDBC();

    @Override
    public void add(Student newStudent) {
        testJDBC.add(newStudent);
    }

    @Override
    public void alter(Student alterStudent) {
        testJDBC.alterStudent(alterStudent);
    }

    @Override
    public void del(String id) {
        testJDBC.delStudent(id);
    }

    @Override
    public Integer getMaxId() {
        return testJDBC.getMaxId();
    }

    @Override
    public List getAllId() {
        return testJDBC.getAllId();
    }

//    @Override
//    public List query(String searchVlaue) {
//        searchVlaue = searchVlaue.trim();
//        return testJDBC.query(searchVlaue);
//    }
}
